/*
 * @Author: 张小平
 * @Date:   2025-05-01
 * @Email:  qqshuqian@163.com
 * @Copyright © 2024 aseyun. All rights reserved.
 */

import {validateRules} from "@/framework-core/utils/validateRule";

export const tableOption = {
  border: true,
  index: true,
  menu:false,
  indexLabel: '#',
  stripe: true,
  menuAlign: 'center',
  grid: window.isMobile,
  gridSpan: 24,
  searchMenuSpan: 6,
  align: 'center',
  menuWidth:400,
  searchEnter:true,
  column: [
    {
      type:"input",
      label: '姓名',
      prop: 'nickName',
      fixed: true,
      search: true,
      span: 24,
      rules: [
        {
          required: true,
          message: '请输入姓名'
        }]
    },
    {
      type: 'input',
      label: '手机号',
      prop: 'phone',
      // rules: validateRules["mobile"],
      span: 24,
    },
    {
      type: 'select',
      label: '性别',
      prop: 'sex',
      sortable:"custom",
      "span": 12,
      dicCode:"sex",
      dicCodeType:1,
      'search': true,
      rules: [
        {
          required: true,
          message: '请选择性别'
        }]
    },
    {
      type: 'input',
      label: '邮箱',
      prop: 'email',
      span: 24,
    },
    {
      type: 'input',
      label: '登录名',
      prop: 'loginName',
      span: 24,
      'search': true,
    },
    // {
    //   type: 'orgTreeChoose',
    //   component: 'orgTreeChoose',
    //   label: '机构',
    //   multiple:true,
    //   prop: 'org',
    //   value:123,
    //   span: 24,
    // },
    // {
    //   type: 'userChoose',
    //   component: 'userChoose',
    //   label: '学生',
    //   prop: 'myUserId',
    //   span: 24,
    // },
    {
      width: 150,
      type: 'datetime',
      label: '创建时间',
      prop: 'createTime',
      format: 'YYYY-MM-DD HH:mm',
      display: false,
      span: 24
    },
    {
      width: 150,
      type: 'datetime',
      label: '最后登录时间',
      prop: 'lastLoginTime',
      format: 'YYYY-MM-DD HH:mm',
      display: false,
      span: 24
    },
    {
      width: 150,
      label: '最后登录IP',
      prop: 'lastLoginIp',
      display: false,
      span: 24
    }
  ]
}



export const tableItemOption = {
  border: true,
  index: true,
  indexLabel: '#',
  stripe: true,
  menuAlign: 'center',
  align: 'center',
  refreshBtn: false,
  showClomnuBtn: false,
  searchSize: 'mini',
  addBtn:false,
  editBtn:false,
  column: [
    {
      type: 'input',
      label: '角色编码',
      prop: 'roleCode',
      editDisabled: false,
      span: 12
    },
    {
      type: 'input',
      label: '角色名称',
      prop: 'roleName',
      editDisabled: false,
      span: 12
    },
    {
      type: 'input',
      label: '机构名称',
      prop: 'orgName',
      value:'0',
      span: 12
    },
    {
      type: 'select',
      label: '数据权限',
      prop: 'permission',
      span: 12,
      dicData: [{
        label: '全部',
        value: 'all'
      }, {
        label: '部门及其下属',
        value: 'dep'
      }, {
        label: '本级',
        value: 'depself'
      }, {
          label: '本人',
          value: 'self'
        }
      ]
    },
    {
      type: 'date',
      label: '开始时间',
      prop: 'kssj',
      value:'0',
      span: 12
    },
    {
      type: 'date',
      label: '结束时间',
      prop: 'jssj',
      value:'0',
      span: 12
    },
    {
      type: 'select',
      label: '是否代理',
      prop: 'sfdl',
      sortable:"custom",
      "span": 12,
      'search': false,
    },
  ]
}



